<%-- 
    Document   : script-sign-up
    Created on : Aug 24, 2011, 7:26:11 PM
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

    <link rel="stylesheet" href="<%=request.getContextPath()%>/client/css/validationEngine.jquery.css" type="text/css"/>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/client/css/template.css" type="text/css"/>
    <script src="<%=request.getContextPath()%>/client/js/jquery-1.6.2.min.js" type="text/javascript">
    </script>
    <script src="<%=request.getContextPath()%>/client/js/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8">
    </script>
    <script src="<%=request.getContextPath()%>/client/js/jquery.validationEngine.js" type="text/javascript" charset="utf-8">
    </script>
    <script src="<%=request.getContextPath()%>/client/js/jquery.corner.js" type="text/javascript" charset="utf-8">
    </script>
    <script src="<%=request.getContextPath()%>/client/js/style.js" type="text/javascript" charset="utf-8">
    </script>
    <script>
        jQuery(document).ready(function(){
            // binds form submission and fields to the validation engine
            jQuery("#frmDangKy").validationEngine();
        });

        /**
         *
         * @param {jqObject} the field where the validation applies
         * @param {Array[String]} validation rules for this field
         * @param {int} rule index
         * @param {Map} form options
         * @return an error string if validation failed
         */
        function checkHELLO(field, rules, i, options){
            if (field.val() != "HELLO") {
                // this allows to use i18 for the error msgs
                return options.allrules.validate2fields.alertText;
            }
        }
        function clearTextBox(){
            document.getElementById("tfTenDangNhap").value = "";
            document.getElementById("tfMatKhau").value = "";
            document.getElementById("tfMatKhau2").value = "";
            document.getElementById("tfHoTen").value = "";
            document.getElementById("tfDiaChi").value = "";
            document.getElementById("tfEmail").value = "";
        }
    </script>
